﻿using FluentNHibernate.Conventions;

namespace NHibernate.Data.Conventions
{
    public class TableNameConvention : IClassConvention
    {
        public void Apply(FluentNHibernate.Conventions.Instances.IClassInstance instance)
        {
            string typeName = instance.EntityType.Name;

            instance.Table(Inflector.Inflector.Pluralize(typeName));
        }
    }
}